import React, { Component, Suspense, lazy } from 'react';
import { withRouter, NavLink, Switch, Redirect, Route, Router } from 'react-router-dom';

const View = lazy(() => import('./view/App.jsx'))
const Views = lazy(() => import('./view/index'))
const tiantian = lazy(() => import('./homeWork/5-14(6ri)/App'))
// aphone页面
const Aphone = lazy(() => import('./app/jsx/iphone'))
const Eoc = lazy(() => import('./app/jsx/oec/oec'))
const Wk =lazy(()=>import('./app/jsx/wakuang/wakuang'))
const G = lazy(() => import('./app/jsx/oec/gzy/g'))
const Z = lazy(() => import('./app/jsx/oec/gzy/z'))
const Y = lazy(() => import('./app/jsx/oec/gzy/y'))

const jing = lazy(()=>import('./jianli/jsx/jingli'))
const ge = lazy(()=>import('./jianli/jsx/geren'))
const lian =lazy(()=>import('./524lian/App'))
// const MyComponent = lazy(() => import('./MyComponent')) 
class App extends Component {
    render() {
        return (

            <Switch>
                <Suspense fallback={<h1>Loading...</h1>}>
                    <Route exact path='/' component={tiantian}></Route>
                    <Route path='/view' component={View}></Route>
                    <Route path='/views' component={Views}></Route>
                    <Route path='/iphone' component={Aphone}></Route>
                    <Route path='/eoc' component={Eoc}></Route>
                    <Route path='/g' component={G}></Route>
                    <Route path='/z' component={Z}></Route>
                    <Route path='/y' component={Y}></Route>
                    <Route path='/jing' component={jing}></Route>
                    <Route path='/lian' component={lian}></Route>
                    <Route path='/wakuang' component={Wk}></Route>
                    <Route path='/geren' component={ge}/>
                    {/* <Redirect to='/'></Redirect> */}
                </Suspense>
            </Switch>
        );
    }
}
export default App;